var status = -1;
var selectionLog = [];

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.npc_ChangeController(9400580, "oid=201255", 3567, -1264, 6, 3521, 3617, 1, true, false);
            cm.npc_ChangeController(9400593, "oid=201256", 3512, -1257, 6, 3512, 3562, 1, true, false);
            cm.npc_ChangeController(9400595, "oid=201257", 3668, -1273, 8, 3618, 3701, 0, true, false);
            cm.spawnMob(9402313, 1, 3100, 326);
            cm.spawnMob(9402266, 1, 3000, 325);
            cm.spawnMob(9402301, 1, 2800, 325);
            cm.getPlayer().scheduleOpenNpcTask(60, 3, "莫奈德_Act1_营救卡夫塔佩");
            cm.dispose()
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};